/*
* 歌词的请求配置
*
* */
import {commonParams} from "./config";
import axios from 'axios';



export function getLyric (mid) {
  const url = '/api/lyric';
  const data = Object.assign({},commonParams,{
    songmid: mid,
    pcachetime: + new Date(), // + new Date()是 new Date().getTime()的简写，获取当前时间戳的
    platform: 'yqq',
    hostUin: 0,
    needNewCode: 0,
    g_tk: 5381,  // 歌词的g_tk值有可能会变，根据实际情况更改
    format: 'json'
  });

  return axios.get(url,{
    params: data
  }).then((res) => {
   return Promise.resolve(res.data)
  })
}
